import 'package:boss/common/common.dart';
import 'package:boss/http/api_response.dart';
import 'package:boss/models/account_for_time.dart';
import 'package:boss/models/analysis_detail.dart';
import 'package:boss/models/batch_delete_commodity_result.dart';
import 'package:boss/models/bill_summary.dart';
import 'package:boss/models/book_info_list_data.dart';
import 'package:boss/models/cloud_printer.dart';
import 'package:boss/models/commission.dart';
import 'package:boss/models/commodity_ranking_page_data.dart';
import 'package:boss/models/coupon.dart';
import 'package:boss/models/delivery_setting_data.dart';
import 'package:boss/models/login_user.dart';
import 'package:boss/models/material.dart';
import 'package:boss/models/mch_data.dart';
import 'package:boss/models/necessary_order.dart';
import 'package:boss/models/offers.dart';
import 'package:boss/models/order_detail_data.dart';
import 'package:boss/models/order_header.dart';
import 'package:boss/models/order_page_data.dart';
import 'package:boss/models/package_group.dart';
import 'package:boss/models/packing_data.dart';
import 'package:boss/models/pay_info_form.dart';
import 'package:boss/models/pay_qr_code.dart';
import 'package:boss/models/printer.dart';
import 'package:boss/models/printer_bill_style.dart';
import 'package:boss/models/qr_statistics.dart';
import 'package:boss/models/qr_statistics_detail_page.dart';
import 'package:boss/models/reback_order_list_data.dart';
import 'package:boss/models/role.dart';
import 'package:boss/models/search_takeout_data.dart';
import 'package:boss/models/sort_commodity_cell.dart';
import 'package:boss/models/staff.dart';
import 'package:boss/models/staff_page_data.dart';
import 'package:boss/models/staff_sell_item.dart';
import 'package:boss/models/staff_tip_page_data.dart';
import 'package:boss/models/store_area.dart';
import 'package:boss/models/store_group_info.dart';
import 'package:boss/models/store_income.dart';
import 'package:boss/models/store_list_with_user_info.dart';
import 'package:boss/models/store_menu.dart';
import 'package:boss/models/store_message.dart';
import 'package:boss/models/store_revenue.dart';
import 'package:boss/models/store_staff_data.dart';
import 'package:boss/models/store_table.dart';
import 'package:boss/models/store_type.dart';
import 'package:boss/models/takeout_business.dart';
import 'package:boss/models/takeout_order_count.dart';
import 'package:boss/models/takeout_order_list_data.dart';
import 'package:boss/models/takeout_summary.dart';
import 'package:boss/models/un_bound_commodity_list_data.dart';
import 'package:boss/models/version.dart';
import 'package:boss/models/vice_screen.dart';
import 'package:boss/ui/page/takeoutManagement/constant/takeout_status.dart';
import 'package:dio/dio.dart';
import 'package:retrofit/http.dart';

part 'api.g.dart';

@RestApi()
abstract class Api {
  factory Api(Dio dio, {String baseUrl}) = _Api;

  //删除菜单分类
  @POST('/boss/takeout/menu/delete')
  Future<ApiResponse> deleteTakeoutMenuCategory(@Body() Map<String, dynamic> data);

  //删除菜单分类
  @POST('/boss/menuCategory/delete')
  Future<ApiResponse> deleteMenuCategory(@Body() Map<String, dynamic> data);

  //查询菜单分类列表
  @GET('/boss/takeout/menu/list')
  Future<ApiResponse<List<StoreMenu>>> queryTakeoutMenuCategory();

  //查询菜单分类列表
  @POST('/boss/menuCategory/listV2')
  Future<ApiResponse<List<StoreMenu>>> queryMenuCategory();

  //查询所有加料
  @GET('/boss/takeout/meterial/list')
  Future<ApiResponse<List<Material>>> queryTakeoutMeterialList();

  //查询所有加料
  @GET('/boss/meterial/queryAllCommodityMeterial')
  Future<ApiResponse<List<Material>>> queryMeterialList();

  //添加加料
  @POST('/boss/takeout/meterial/add')
  Future<ApiResponse<Material>> addTakeoutMeterial(@Body() Map<String, dynamic> data);

  //添加加料
  @POST('/boss/meterial/addCommodityMeterial')
  Future<ApiResponse<Material>> addMeterial(@Body() Map<String, dynamic> data);

  //更新加料
  @POST('/boss/takeout/meterial/update')
  Future<ApiResponse> updateTakeoutMeterial(@Body() Material data);

  //更新加料
  @POST('/boss/meterial/updateCommodityMeterial')
  Future<ApiResponse> updateMeterial(@Body() Material data);

  //新建菜单分类
  @POST('/boss/takeout/menu/add')
  Future<ApiResponse> addTakeoutMenuCategory(@Body() Map<String, dynamic> data);

  //新建菜单分类
  @POST('/boss/menuCategory/addNew')
  Future<ApiResponse> addMenuCategory(@Body() Map<String, dynamic> data);

  //修改菜单分类
  @POST('/boss/takeout/menu/update')
  Future<ApiResponse> updateTakeoutMenuCategory(@Body() StoreMenu data);

  //修改菜单分类
  @POST('/boss/menuCategory/update')
  Future<ApiResponse> updateMenuCategory(@Body() StoreMenu data);

  //查询桌位区域列表
  @GET('/boss/store/queryAreaAndTableList')
  Future<ApiResponse<List<StoreArea>>> queryStoreTableArea();

  //添加桌位
  @POST('/boss/storeTable/add')
  Future<ApiResponse<StoreTable>> addStoreTable(@Body() Map<String, dynamic> data);

  //删除桌位
  @POST('/boss/storeTable/delete')
  Future<ApiResponse> deleteStoreTableById(@Body() Map<String, dynamic> data);

  //修改桌台
  @POST('/boss/storeTable/update')
  Future<ApiResponse> updateStoreTable(@Body() StoreTable data);

  //添加桌位区域
  @POST('/boss/storeArea/add')
  Future<ApiResponse<StoreArea>> addStoreArea(@Body() Map<String, dynamic> data);

  //删除桌位区域
  @POST('/boss/storeArea/delete')
  Future<ApiResponse> deleteStoreAreaById(@Body() Map<String, dynamic> data);

  //修改桌位区域
  @POST('/boss/storeArea/update')
  Future<ApiResponse> updateStoreArea(@Body() Map<String, dynamic> data);

  //批量添加桌台
  @POST('/boss/storeTable/addByNum')
  Future<ApiResponse<List<StoreTable>>> addTableByNum(@Body() Map<String, dynamic> data);

  //删除菜品
  @POST('/boss/takeout/commodity/delete')
  Future<ApiResponse> deleteTakeoutCommodity(@Body() Map<String, dynamic> data);

  //删除菜品
  @POST('/boss/commodity/delete')
  Future<ApiResponse> deleteCommodity(@Body() Map<String, dynamic> data);

  //添加菜品
  @POST('/boss/takeout/commodity/add')
  Future<ApiResponse> addTakeoutCommodity(@Body() Map<String, dynamic> data);

  //添加菜品
  @POST('/boss/commodity/addNew')
  Future<ApiResponse> addCommodity(@Body() Map<String, dynamic> data);

  //登录
  @POST('')
  Future<ApiResponse<LoginUser>> login(@Body() Map<String, dynamic> data);

  //用户新的账号密码登录
  @POST('')
  Future<ApiResponse<StoreListWithUserInfo>> loginByBoss(@Body() Map<String, dynamic> data);

  //获取验证码接口
  @POST('')
  Future<ApiResponse> getValidateCode(@Body() Map<String, dynamic> data);

  //验证注册首页验证码 type 1  注册门店 2 等级店铺忘记密码
  @POST('')
  Future<ApiResponse> storeCheckData(@Body() Map<String, dynamic> data);

  //查询所有店铺类型
  @GET('/boss/storeType/queryAll')
  Future<ApiResponse<List<StoreType>>> queryStoreType();

  //注册一个新门店
  @POST('')
  Future<ApiResponse<StoreMessage>> addStore(@Body() Map<String, dynamic> data);

  //忘记密码
  @POST('/boss/sysUser/updatePassword')
  Future<ApiResponse> updatePassword(@Body() Map<String, dynamic> data);

  //开台必点项列表
  @GET('/boss/business/setting/necessary/list')
  Future<ApiResponse<List<NecessaryOrder>>> queryNecessaryOrders();

  //开台必点-保存
  @POST('/boss/business/setting/necessary/updateStatus')
  Future<ApiResponse> updateNecessaryOrdersStatus(@Body() List<int> ids);

  //开台必点项添加
  @POST('/boss/business/setting/necessary/add')
  Future<ApiResponse<NecessaryOrder>> addNecessaryOrder(@Body() NecessaryOrder data);

  //开台必点项修改
  @POST('/boss/business/setting/necessary/update')
  Future<ApiResponse> updateNecessaryOrder(@Body() NecessaryOrder data);

  //开台必点-删除
  @GET('/boss/business/setting/necessary/delete')
  Future<ApiResponse> deleteNecessaryOrder(@Query('id') int id);

  //根据活动状态查询店内折扣
  //1进行中2未开始3已结束
  @GET('/boss/storeDiscount/queryStoreDiscountByStatus')
  Future<ApiResponse<List<Offers>>> queryStoreDiscountByStatus(@Query('discountStatus') int discountStatus);

  //添加整单折扣
  @POST('/boss/storeDiscount/addOrderDiscount')
  Future<ApiResponse> addOrderDiscount(@Body() Map<String, dynamic> dataObj);

  //添加方案折扣
  @POST('/boss/storeDiscount/addPlanDiscount')
  Future<ApiResponse> addPlanDiscount(@Body() Map<String, dynamic> dataObj);

  //添加满减
  @POST('/boss/storeDiscount/addFullDiscount')
  Future<ApiResponse> addFullDiscount(@Body() Map<String, dynamic> dataObj);

  //添加特价菜
  @POST('/boss/storeDiscount/addFoodDiscount')
  Future<ApiResponse> addFoodDiscount(@Body() Map<String, dynamic> dataObj);

  //添加第二份优化
  @POST('/boss/storeDiscount/addSecondDiscount')
  Future<ApiResponse> addSecondDiscount(@Body() Map<String, dynamic> dataObj);

  //添加买赠
  @POST('/boss/storeDiscount/addBuyGiveDiscount')
  Future<ApiResponse> addBuyGiveDiscount(@Body() Map<String, dynamic> dataObj);

  //根据活动状态查询店内折扣
  @POST('/boss/storeDiscount/updateStoreDiscount')
  Future<ApiResponse> updateStoreDiscount(@Body() Map<String, dynamic> dataObj);

  //排序桌位区域
  @POST('/boss/storeArea/sortStoreArea')
  Future<ApiResponse> sortStoreArea(@Body() Map<String, dynamic> dataObj);

  //修改店铺信息
  @POST('/boss/store/info/update')
  Future<ApiResponse<StoreMessage>> updateStoreMsg(@Body() StoreMessage storeMessage);

  //获取店铺信息
  @GET('/boss/store/info/get')
  Future<ApiResponse<StoreMessage>> getStoreMessage(@Query('storeId') int storeId);

  //新增账户信息
  @POST('/boss/mch/info/add')
  Future<ApiResponse<MchData>> addMchInfo(@Body() PayInfoForm data);

  //修改账户信息
  @POST('/boss/mch/info/update')
  Future<ApiResponse<MchData>> updateMchInfo(@Body() PayInfoForm data);

  //获取账户信息
  @GET('/boss/mch/info/get')
  Future<ApiResponse<MchData>> queryMchInfo();

  //菜品分类排序
  @POST('/boss/menuCategory/sortMenu')
  Future<ApiResponse> sortMenuCategory(@Body() Map<String, dynamic> data);

  //菜品分类排序
  @POST('/boss/takeout/menu/sort')
  Future<ApiResponse> sortTakeoutMenuCategory(@Body() Map<String, dynamic> data);

  //通过加料的id删除加料
  @GET('/boss/takeout/meterial/delete')
  Future<ApiResponse> deleteTakeoutMeterial(@Query('id') int id);

  //通过加料的id删除加料
  @GET('/boss/meterial/deleteCommodityMeterial')
  Future<ApiResponse> deleteMeterial(@Query('id') int id);

  //桌台排序
  @POST('/boss/storeTable/sortStoreTable')
  Future<ApiResponse> sortStoreTable(@Body() Map<String, dynamic> data);

  //修改菜品
  @POST('/boss/commodity/updateNew')
  Future<ApiResponse> updateCommodity(@Body() Map<String, dynamic> data);

  //修改菜品
  @POST('/boss/takeout/commodity/updateNew')
  Future<ApiResponse> updateTakeoutCommodity(@Body() Map<String, dynamic> data);

  //添加员工
  @POST('/boss/sysUser/add')
  Future<ApiResponse> addStaff(@Body() Staff staff);

  //修改员工
  @POST('/boss/sysUser/edit')
  Future<ApiResponse> updateStaff(@Body() Staff staff);

  //删除员工
  @GET('/boss/sysUser/delete')
  Future<ApiResponse> deleteStaff(@Query('userId') int userId);

  //查询当日营收数据
  @GET('/boss/orderProp/storeIncomeVOToday')
  Future<ApiResponse<StoreIncome>> queryStoreIncome();

  //查询日、周、月、年账目
  @GET('/boss/accountItem/queryAccountItemsForTime')
  Future<ApiResponse<List<StoreIncomeForTime>>> queryAccountItemsForTime();

  //查询员工列表
  @POST('/boss/sysUser/list')
  Future<ApiResponse<StaffPageData>> queryStaffList(@Body() Map<String, dynamic> data, {@Query('page') int page = 1, @Query('rows') int rows = Constant.rows});

  //查询员工列表
  @POST('/boss/sysUser/queryList')
  Future<ApiResponse<List<Staff>>> queryAllStaffList();

  //菜品排行
  @GET('/boss/report/queryAndSortCommodityCellDate')
  Future<ApiResponse<CommodityRankingPageData>> queryAndSortCommodityCellDate({
    @Query('page') int page = 1,
    @Query('rows') int rows = Constant.rows,
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('commodityOrMenu') int commodityOrMenu = 0,
    @Query('sortType') int sortType = 1,
  });

  //设置营业额
  @GET('/boss/accountItem/setStoreTarget')
  Future<ApiResponse> setStoreTargetAccount(@Query('target') int target, @Query('type') int type);

  //提交反馈建议
  @POST('/boss/feedback/submit')
  Future<ApiResponse> feedbackSubmit(@Body() Map<String, dynamic> data);

  //员工小费列表
  @GET('/boss/waiterInfo/sort')
  Future<ApiResponse<StaffTipPageData>> queryWaiterTipList({
    @Query('page') int page,
    @Query('rows') int rows = Constant.rows,
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
  });

  //查询二维码模块是否绑定
  @GET('/boss/store/qrcode/get')
  Future<ApiResponse> qrCodeVal();

  //会员-新增会员
  @POST('/boss/store/qrcode/customize')
  Future<ApiResponse> customize(@Body() Map<String, dynamic> data);

  //会员-会员管理list
  @GET('/boss/member/searchMember')
  Future<ApiResponse> searchMember({
    @Query('input') String input,
    @Query('rows') int rows,
    @Query('page') int page,
  });

  //会员-会员管理顶部信息
  @GET('/boss/member/memberHead')
  Future<ApiResponse> memberHead();

  //会员-新增会员
  @POST('/boss/member/addMember')
  Future<ApiResponse> addMember(@Body() Map<String, dynamic> data);

  //会员-充值/消费规则列表
  @GET('/boss/memberRule/queryMemberRule')
  Future<ApiResponse> queryMemberRule();

  //会员-充值/消费规则列表-详情(编辑)
  @POST('/boss/member/updateMember')
  Future<ApiResponse> updateMember(@Body() Map<String, dynamic> data);

  //会员-充值/消费规则列表
  @POST('/boss/memberRule/addMemberRule')
  Future<ApiResponse> addMemberRule(@Body() Map<String, dynamic> data);

  //账目总汇
  @GET('/boss/orderProp/orderpropInfo')
  Future<ApiResponse<BillSummary>> orderPropInfo({@Query('startDate') String startDate, @Query('endDate') String endDate});

  //账目总汇-发送邮箱 type 状态跟随店铺订单 tab
  @GET('/boss/orderProp/sendOrderPropListEmail')
  Future<ApiResponse> sendOrderPropListEmail({
    CancelToken cancelToken,
    @Query('email') String email,
    @Query('startDate') String startDate,
    @Query('endDate') String endDate,
    @Query('type') int type,
  });

  //订单明细头
  @GET('/boss/orderProp/orderPropDetailHead')
  Future<ApiResponse<OrderHeader>> queryOrderDetailHead({@Query('startDate') String startDate, @Query('endDate') String endDate});

  //根据查询条件查询订单
  @GET('/boss/orderProp/queryOrderPropList')
  Future<ApiResponse<OrderPageData>> queryOrderList({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('type') int type,
    @Query('page') int page,
    @Query('rows') int rows = Constant.rows,
  });

  //查询订单详情
  @GET('/boss/orderProp/queryOrderDetailByUnionOrderId')
  Future<ApiResponse<OrderDetailData>> queryOrderDetailByUnionOrderId(@Query('unionOrderId') String unionOrderId);

  //获取打印机列表
  @GET('/boss/device/printer/list')
  Future<ApiResponse<List<Printer>>> queryListPrinter();

  //批量修改菜品分类
  @POST('/boss/takeout/commodity/update/batch')
  Future<ApiResponse> batchMoveTakeoutCommodity(@Body() Map<String, dynamic> data);

  //批量修改菜品分类
  @POST('/boss/commodity/batchMoveCommodity')
  Future<ApiResponse> batchMoveCommodity(@Body() Map<String, dynamic> data);

  //批量删除菜品
  @POST('/boss/takeout/commodity/delete/batch')
  Future<ApiResponse<List<BatchDeleteCommodityResult>>> batchDeleteTakeoutCommodity(@Body() Map<String, dynamic> data);

  //批量删除菜品
  @POST('/boss/commodity/batchDeleteCommodity')
  Future<ApiResponse<List<BatchDeleteCommodityResult>>> batchDeleteCommodity(@Body() Map<String, dynamic> data);

  //会员-会员list
  @GET('/boss/membercategory/queryStoreMemberRank')
  Future<ApiResponse> queryStoreMemberRank();

  //会员-新增
  @POST('/boss/membercategory/addMemberRank')
  Future<ApiResponse> addMemberRank(@Body() Map<String, dynamic> data);

  //会员-会员规则-删除对应的会员等级
  @GET('/boss/membercategory/deleteMemberRank')
  Future<ApiResponse> deleteMemberRank(@Query('id') int id);

  //会员-消费规则list排序
  @POST('/boss/membercategory/sortStoreMemberRank')
  Future<ApiResponse> sortStoreMemberRank(@Body() Map<String, dynamic> data);

  //会员-消费规则list-编辑更改item
  @POST('/boss/membercategory/updateMemberRank')
  Future<ApiResponse> updateMemberRank(@Body() Map<String, dynamic> data);

  //会员-会员list-冻结和解冻
  @GET('/boss/member/updateMemberStatus')
  Future<ApiResponse> updateMemberStatus({@Query('phoneNum') String phoneNum, @Query('type') int type});

  //会员-会员list-item详情
  @GET('/boss/member/memberdetail')
  Future<ApiResponse> memberDetail(@Query('id') String id);

  //获取版本信息
  @GET('/boss/version/master')
  Future<ApiResponse<Version>> getVersion(@Query('uuid') String uuid);

  //验证码登录
  @POST('/auth/loginByVerifyCode')
  Future<ApiResponse<StoreListWithUserInfo>> loginByCode(@Body() Map<String, dynamic> data);

  //校验验证码登录
  @POST('/auth/authLoginByVerifyCode')
  Future<ApiResponse<LoginUser>> authLoginByCode(@Body() LoginUser user);

  //获取套餐分组列表
  @GET('/boss/takeOut/packages/group/list')
  Future<ApiResponse<List<PackageGroup>>> queryTakeoutPackageGroups();

  //获取套餐分组列表
  @GET('/boss/packages/group/list')
  Future<ApiResponse<List<PackageGroup>>> queryPackageGroups();

  //删除套餐分组
  @GET('/boss/takeOut/packages/group/remove')
  Future<ApiResponse> deleteTakeoutPackageGroup(@Query('id') int id);

  //删除套餐分组
  @GET('/boss/packages/group/remove')
  Future<ApiResponse> deletePackageGroup(@Query('id') int id);

  //更新套餐分组
  @POST('/boss/takeOut/packages/group/update')
  Future<ApiResponse> updateTakeoutPackageGroup(@Body() PackageGroup packageGroup);

  //更新套餐分组
  @POST('/boss/packages/group/update')
  Future<ApiResponse> updatePackageGroup(@Body() PackageGroup packageGroup);

  //新增套餐分组
  @POST('/boss/takeOut/packages/group/add')
  Future<ApiResponse> addTakeoutPackageGroup(@Body() PackageGroup packageGroup);

  //新增套餐分组
  @POST('/boss/packages/group/add')
  Future<ApiResponse<PackageGroup>> addPackageGroup(@Body() PackageGroup packageGroup);

  //新增套餐
  @POST('/boss/takeOut/packages/add')
  Future<ApiResponse> addTakeoutPackage(@Body() Map<String, dynamic> data);

  //新增套餐
  @POST('/boss/packages/add')
  Future<ApiResponse> addPackage(@Body() Map<String, dynamic> data);

  //修改套餐
  @POST('/boss/takeOut/packages/update')
  Future<ApiResponse> updateTakeoutPackage(@Body() Map<String, dynamic> data);

  //修改套餐
  @POST('/boss/packages/update')
  Future<ApiResponse> updatePackage(@Body() Map<String, dynamic> data);

  //删除套餐
  @GET('/boss/takeOut/packages/remove')
  Future<ApiResponse> deleteTakeoutPackage(@Query('commodityId') int commodityId);

  //删除套餐
  @GET('/boss/packages/remove')
  Future<ApiResponse> deletePackage(@Query('commodityId') int commodityId);

  //获取经营设置信息
  @GET('/boss/takeout/business/get')
  Future<ApiResponse<TakeoutBusiness>> getTakeoutBusiness();

  //保存经营设置信息
  @POST('/boss/takeout/business/update')
  Future<ApiResponse> updateTakeoutBusiness(@Body() TakeoutBusiness data);

  //获取配送费设置
  @GET('/boss/takeout/delivery/get')
  Future<ApiResponse<DeliverySettingData>> queryDeliver();

  //修改配送费设置
  @POST('/boss/takeout/delivery/update')
  Future<ApiResponse> updateDeliver(@Body() DeliverySettingData data);

  //获取打包费用
  @GET('/boss/takeout/packing/get')
  Future<ApiResponse<PackingData>> queryPacking();

  //修改打包费设置
  @POST('/boss/takeout/packing/update')
  Future<ApiResponse> updatePacking(@Body() PackingData data);

  //根据订单状态查询外卖订单
  @GET('/boss/takeOutOrder/queryTakeOutOrderList')
  Future<ApiResponse<TakeoutOrderListData>> queryTakeOutOrderList({
    @Query('status') int status,
    @Query('input') String input,
    @Query('rows') int rows = 10,
    @Query('page') int page = 1,
  });

  //获取云打印机详情
  @GET('/boss/device/cloud/get')
  Future<ApiResponse<CloudPrinter>> getCloudPrinterById(@Query('id') int id);

  //售后单
  @GET('/boss/takeOutOrder/queryTakeOutOrderList')
  Future<ApiResponse<RebackOrderListData>> queryRebackOrders({
    CancelToken cancelToken,
    @Query('input') String input,
    @Query('rows') int rows = 10,
    @Query('page') int page = 1,
    @Query('status') int status = TakeoutStatus.REBACK_ORDER,
  });

  //外卖接单
  @GET('/boss/takeOutOrder/getOrder')
  Future<ApiResponse<TakeoutOrderItem>> getTakeOutOrder(@Query('takeOutId') String takeOutId);

  //外卖拒单
  @GET('/boss/takeOutOrder/rejectOrder')
  Future<ApiResponse> rejectTakeOutOrder(@Query('takeOutId') String takeOutId);

  //加小费
  @GET('/boss/takeOutOrder/increaseTips')
  Future<ApiResponse> increaseTips(@Query('takeOutId') String takeOutId, @Query('tips') int tips);

  //外卖明细 - 汇总标签
  @GET('/boss/takeOutOrder/detail/queryTakeoutSummary')
  Future<ApiResponse<TakeoutSummary>> queryTakeoutSummary({
    CancelToken cancelToken,
    @Query('takeNo') int takeNo,
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
  });

  //外卖明细 - 订单列表
  @GET('/boss/takeOutOrder/detail/queryTakeoutOrderListByType')
  Future<ApiResponse<TakeoutOrderListData>> queryTakeoutOrders({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('page') int page = 1,
    @Query('rows') int rows = 10,
    @Query('type') int type = 0,
  });

  //同意退款
  @POST('/boss/takeOutOrder/agreeRefund')
  Future<ApiResponse> agreeRefund(@Body() Map<String, dynamic> data);

  //客户取餐
  @POST('/boss/takeOutOrder/pickup')
  Future<ApiResponse> userPickup(@Body() Map<String, dynamic> data);

  //拒绝退款
  @POST('/boss/takeOutOrder/rejectRefund')
  Future<ApiResponse> rejectRefund(@Body() Map<String, dynamic> data);

  //同意取消配送
  @POST('/boss/takeOutOrder/agreeCancelDelivery')
  Future<ApiResponse> agreeCancelDelivery(@Body() Map<String, dynamic> data);

  //拒绝取消配送
  @POST('/boss/takeOutOrder/rejectCancelDelivery')
  Future<ApiResponse> rejectCancelDelivery(@Body() Map<String, dynamic> data);

  //确认完成订单
  @POST('/boss/takeOutOrder/completeTakeoutOrder')
  Future<ApiResponse> completeTakeoutOrder(@Body() Map<String, dynamic> data);

  //部分退款
  @POST('/boss/takeOutOrder/storeRefund')
  Future<ApiResponse> storeRefund(@Body() Map<String, dynamic> data);

  //获取订单处理数量统计
  @GET('/boss/takeOutOrder/queryTakeoutOrderCount')
  Future<ApiResponse<TakeoutOrderCount>> queryTakeoutOrderCount({@Query('input') String input = ''});

  //取消配送
  @GET('/boss/takeOutOrder/cancelDelivery')
  Future<ApiResponse> cancelDelivery(@Query('takeOutId') String takeOutId);

  //获取云打印机列表
  @GET('/boss/device/cloud/list')
  Future<ApiResponse<List<CloudPrinter>>> queryCloudPrinterList();

  //添加云打印机
  @POST('/boss/device/cloud/add')
  Future<ApiResponse> addCloudPinter(@Body() CloudPrinter data);

  //删除云打印机
  @GET('/boss/device/cloud/delete')
  Future<ApiResponse> deleteCloudPrinter(@Query('id') int id);

  //修改云打印机
  @POST('/boss/device/cloud/update')
  Future<ApiResponse> updateCloudPrinter(@Body() CloudPrinter data);

  //修改云打印机
  @POST('/boss/device/cloud/register')
  Future<ApiResponse> registerCloudPrinter(@Body() Map<String, dynamic> data);

  //获取打印机样式
  @GET('/boss/device/printer/bill/list')
  Future<ApiResponse<List<PrinterBillStyle>>> queryPrinterBillList();

  //售后记录
  @GET('/boss/takeOutOrder/queryTakeOutRefundOrderList')
  Future<ApiResponse<RebackOrderListData>> queryTakeOutRefundOrderList({
    @Query('input') String input,
    @Query('startTime') String startTime,
    @Query('rows') int rows = 10,
    @Query('page') int page = 1,
  });

  //查询日、周、月、自定义营收，自定义需要传时间，其他type
  @GET('/boss/dataReport/queryStoreRevenueForTime')
  Future<ApiResponse<StoreRevenue>> queryStoreRevenueForTime({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
  });

  //菜品排行 通过时间段和单品分类进行查询 按销量和金额进行排序
  @GET('/boss/dataReport/queryAndSortCommodityCellDate')
  Future<ApiResponse<List<SortCommodityCell>>> queryAndSortCommodityForTime({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('type') int type,
    @Query('commodityOrMenu') int commodityOrMenu,
    @Query('takeOutType') int takeOutType,
    @Query('sortType') int sortType,
  });

  //查询日、周、月、自定义员工，自定义需要传时间，其他type
  @GET('/boss/dataReport/queryStoreStaffForTime')
  Future<ApiResponse<StoreStaffData>> queryStoreStaffForTime({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
  });

  //菜品员工销售明细
  @GET('/boss/dataReport/queryUserAndSortCommodityCellDate')
  Future<ApiResponse<List<StaffSellItem>>> queryUserAndSortCommodityCellDate({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('commodityOrMenu') int commodityOrMenu,
    @Query('takeOutType') int takeOutType,
    @Query('sortType') int sortType,
    @Query('queryID') int queryID,
  });

  //查询昨日，今日、月、上月、自定义小费明细，自定义需要传时间，其他type
  @GET('/boss/dataReport/queryStoreTipDetailForTime')
  Future<ApiResponse<AnalysisDetail>> queryStoreTipDetailForTime({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
  });

  @GET('/boss/dataReport/queryStoreRoyaltyDetailForTime')
  Future<ApiResponse<AnalysisDetail>> queryStoreRoyaltyDetailForTime({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
  });

  @GET('/boss/dataReport/queryStaffBookCommissionDetailForTime')
  Future<ApiResponse<AnalysisDetail>> queryStaffBookCommissionDetailForTime({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
  });

  //添加提成设置
  @POST('/boss/commission/add')
  Future<ApiResponse> addCommission(@Body() Commission data);

  //获取提成设置
  @GET('/boss/commission/list')
  Future<ApiResponse<List<Commission>>> queryCommissionList(@Query('status') String status);

  //删除提成设置
  @POST('/boss/commission/delete')
  Future<ApiResponse> deleteCommission(@Query('id') int id);

  //提成设置详情
  @GET('/boss/commission/get')
  Future<ApiResponse<Commission>> queryCommissionDetail(@Query('id') int id);

  //查询未关联商品列表
  @GET('/boss/takeout/commodity/list/unbind')
  Future<ApiResponse<UnBoundCommodityData>> queryUnBoundCommodityList();

  //关联单个菜品(堂食菜品ID)
  @GET('/boss/takeout/commodity/bind/one')
  Future<ApiResponse> bindCommodity(@Query('commodityId') int commodityId);

  //一键关联
  @GET('/boss/takeout/commodity/bind/all')
  Future<ApiResponse> bindCommodityAll();

  //搜索外卖订单
  @GET('/boss/takeOutOrder/searchTakeOutOrder')
  Future<ApiResponse<SearchTakeoutData>> searchTakeoutList({
    CancelToken cancelToken,
    @Query('status') int status = 0,
    @Query('page') int page = 1,
    @Query('rows') int rows = 20,
    @Query('startDate') String startDate,
    @Query('endDate') String endDate,
    @Query('input') String input,
  });

  //获取商铺信息
  @GET('/boss/store/get')
  Future<ApiResponse> storeGet(@Query('storeId') int storeId);

  //更新店铺信息
  @POST('/boss/store/update')
  Future<ApiResponse> storeUpdate(@Body() Map<String, dynamic> data);

  //成本管理-批量设置
  @POST('/boss/commodity/batchSetCostPrice')
  Future<ApiResponse> batchSetCostPrice(@Body() Map<String, dynamic> data);

  //小费设置-查询
  @GET('/boss/tipSetting/get')
  Future<ApiResponse> tipSettingGet(@Query('tipType') String tipType);

  //小费设置-更新
  @POST('/boss/tipSetting/add')
  Future<ApiResponse> tipSettingAdd(@Body() Map<String, dynamic> data);

  //门店评价-获取门店评价
  @GET('/boss/comment/getCommentDetail')
  Future<ApiResponse> getCommentDetail({
    @Query('beginTime') String beginTime,
    @Query('endTime') String endTime,
    @Query('rows') int rows,
    @Query('page') int page,
    @Query('unionOrderId') String unionOrderId,
  });

  //门店评价-获取门店评价基本信息
  @GET('/boss/comment/getStoreCommentAverageInfo')
  Future<ApiResponse> getStoreCommentAverageInfo();

  //门店评价-回复
  @POST('/boss/reply/add')
  Future<ApiResponse> replyAdd(@Body() Map<String, dynamic> data);

  //报表-敏感操作-金额
  @GET('/report/boss/statSensitiveOrderAmount')
  Future<ApiResponse> statSensitiveOrderAmount({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
  });

  //报表-敏感操作-订单数
  @GET('/report/boss/statSensitiveOrderCount')
  Future<ApiResponse> statSensitiveOrderCount({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
  });

  //报表-提成报表-提成明细list
  @GET('/report/boss/statUserPercentageSumData')
  Future<ApiResponse> statUserPercentageSumData({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
  });

  //报表-提成报表-item提成明细
  @GET('/report/boss/statUserPercentageDetailData')
  Future<ApiResponse> statUserPercentageDetailData({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('userId') int userId,
  });

  //报表-提成报表-店员收银
  @GET('/report/boss/statUserCashSumData')
  Future<ApiResponse> statUserCashSumData({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('userId') int userId,
  });

  //外卖-满减设置
  @GET('/boss/takeout/fulldiscount/query')
  Future<ApiResponse> fullDiscountQuery();

  //外卖-满减设置
  @POST('/boss/takeout/fulldiscount/update')
  Future<ApiResponse> fullDiscountUpdate(@Body() Map<String, dynamic> data);

  //报表-渠道销售统计
  @GET('/report/boss/statSalesChannelData')
  Future<ApiResponse> statSalesChannelData({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
  });

  //报表-店员收银-发送邮箱
  @GET('/report/boss/sendEmailWithUserCashSumDataReport')
  Future<ApiResponse> sendEmailWithUserCashSumDataReport({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('email') String email,
  });

  //报表-渠道销售统计-发送邮件
  @GET('/report/boss/sendEmailWithStatUserCashSumDataReport')
  Future<ApiResponse> sendEmailWithStatUserCashSumDataReport({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('email') String email,
  });

  //外卖接单-查询退款金额详情(专门用于查询外卖菜品满减优惠之类的)
  @POST('/boss/takeOutOrder/calRefundMoneyVO')
  Future<ApiResponse> calRefundMoneyVO(@Body() Map<String, dynamic> data);

  //查询订单详情
  @GET('/boss/takeOutOrder/queryTakeOutOrderByTakeIdV2')
  Future<ApiResponse<TakeoutOrderItem>> queryTakeOutOrderByTakeId(@Query('takeoutId') String takeoutId);

  //预定列表
  @GET('/boss/bookInfo/list')
  Future<ApiResponse<BookInfoListData>> queryBookInfoList({
    @Query('beginArriveTime') String beginArriveTime,
    @Query('endArriveTime') String endArriveTime,
    @Query('beginDate') String beginDate,
    @Query('endDate') String endDate,
    @Query('page') int page,
    @Query('rows') int rows,
    @Query('status') String status,
    @Query('titleEnum') String titleEnum,
  });

  //预定统计
  @GET('/boss/bookInfo/queryBookStatisticsInfo')
  Future<ApiResponse> queryBookStatisticsInfo({
    @Query('beginArriveTime') String beginArriveTime,
    @Query('endArriveTime') String endArriveTime,
    @Query('beginDate') String beginDate,
    @Query('endDate') String endDate,
    @Query('page') int page,
    @Query('rows') int rows,
    @Query('status') String status,
    @Query('titleEnum') String titleEnum,
  });

  //报表-菜品销售统计-获取list
  @GET('/report/boss/commoditySalesData')
  Future<ApiResponse> commoditySalesData({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('sortType') int sortType,
  });

  //报表-菜品销售统计-发送邮箱
  @GET('/report/boss/sendEmailCommoditySalesData')
  Future<ApiResponse> sendEmailCommoditySalesData({
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('sortType') int sortType,
    @Query('email') String email,
  });

  //添加优惠券
  @POST('/boss/couponTemplate/add')
  Future<ApiResponse> addCoupon(@Body() Coupon coupon);

  //修改优惠券
  @POST('/boss/couponTemplate/update')
  Future<ApiResponse> updateCoupon(@Body() Coupon coupon);

  @GET('/app/store/queryStoreGroupInfo')
  Future<ApiResponse<StoreGroupInfo>> queryStoreGroupInfo(@Query('storeId') int storeId);

  //沽清
  @POST('/boss/takeout/commodity/updateTakeoutStockV2')
  Future<ApiResponse> updateTakeoutCommodityStock(@Body() Map<String, dynamic> data);

  @POST('/boss/commodity/updateStockV2')
  Future<ApiResponse> updateCommodityStock(@Body() Map<String, dynamic> data);

  @GET('/boss/store/queryStoreCommodityUnitInfo')
  Future<ApiResponse> queryStoreCommodityUnitInfo();

  @POST('/boss/store/updateCommodityUnit')
  Future<ApiResponse> updateCommodityUnit(@Body() Map<String, dynamic> data);

  //上报设备
  @POST('/boss/app/boss/save')
  Future<ApiResponse> upDevice(@Body() Map<String, dynamic> data);

  //退出登录
  @GET('/boss/app/boss/logout')
  Future<ApiResponse> logout(@Query('uuid') String uuid);

  //查询优惠券列表
  @GET('/boss/couponTemplate/queryValidCouponList')
  Future<ApiResponse<List<Coupon>>> queryValidCouponList();

  @GET('/boss/couponTemplate/queryInvalidCouponList')
  Future<ApiResponse<List<Coupon>>> queryInvalidCouponList();

  //申请收款码
  @GET('/boss/payQrcode/apply')
  Future<ApiResponse> applyPayQrCode(@Query('describe') String describe, @Query('num') int count);

  //绑定收款码
  @POST('/boss/payQrcode/bind')
  Future<ApiResponse> bindPayQrCode(@Body() PayQrCode qrCode);

  //查询收款码
  @GET('/boss/payQrcode/list')
  Future<ApiResponse<PayQrCodePage>> queryPayQrCode(@Query('page') int page, @Query('rows') int rows);

  //修改收款码
  @POST('/boss/payQrcode/update')
  Future<ApiResponse> updatePayQrCode(@Body() PayQrCode data);

  //台卡收款统计
  @GET('/report/qrcode/statistics')
  Future<ApiResponse<QrStatistics>> queryReportTableQr(@Query('startTime') String startTime, @Query('endTime') String endTime);

  @GET('/report/qrcode/detail')
  Future<ApiResponse<QrStatisticsDetailPage>> queryReportTableQrDetail(
    @Query('startTime') String startTime,
    @Query('endTime') String endTime,
    @Query('isRefund') int isRefund,
    @Query('page') int page,
    @Query('rows') int rows, {
    @Query('channelName') String channelName,
  });

  @GET('/boss/sys/role/list')
  Future<ApiResponse<List<Role>>> queryRoles();

  @GET('/boss/sys/role/delete')
  Future<ApiResponse> deleteRole(@Query('roleId') int roleId);

  @GET('/boss/sys/role/queryRulePermissions')
  Future<ApiResponse<List<Permissions>>> queryRulePermissions(@Query('roleId') int roleId);

  @POST('/boss/sys/role/saveAndUpdate')
  Future<ApiResponse<Role>> addOrUpdateRule(@Body() Role role);

  @GET('/boss/store/subscreen/queryStoreSubScreen')
  Future<ApiResponse<ViceScreen>> queryStoreViceScreen();

  @POST('/boss/store/subscreen/saveAndUpdateSubScreen')
  Future<ApiResponse<ViceScreen>> updateStoreViceScreen(@Body() ViceScreen data);
}
